import com.troyworks.datastructures.Array2;
/**
 * @author Troy Gardner
 */
class com.troyworks.datastructures.Generator {
	public static function getRandomNumberSet(from:Number, items:Number, range:Number):Array2{
		var res:Array2 = new Array2();
		var pot:Array2 = new Array2();
		//fill potentials
		var minRange:Number = from - Math.round(.5* range);
		var maxRange:Number = from + Math.round(.5* range);
		for(var i = minRange; i< maxRange; i++){
			pot.push(i);
		}
		while(items--){
			res.push(pot.getRandomElement(null,null, res));
		}
		return res;
	}
}